<?php
abstract class abstract_product {

    protected $product_id;
    protected $model;
    protected $sku;
    protected $upc;
    protected $ean;
    protected $jan;   
    protected $isbn;
    protected $mpn;
    protected $location;
    protected $quantity;
    protected $stock_status_id;
    protected $image;
    protected $manufacturer_id;
    protected $shipping;
    protected $price;
    protected $points;
    protected $tax_class_id;
    protected $date_available;
    protected $weight;
    protected $weight_class_id;
    protected $length;
    protected $width;
    protected $height;
    protected $length_class_id;
    protected $subtract;
    protected $minimum;
    protected $sort_order;
    protected $status;
    protected $date_added;
    protected $date_modified; 
    protected $viewed;
 
    public function getData(){ 
        return get_object_vars($this);
    }

    public function setData($data){
   
        if(isset($data['product_id'])){
            $this->setId($data['product_id']);
        }

        if(isset($data['model'])){
            $this->setModel($data['model']);
        }
         
        if(isset($data['sku'])){
            $this->setSku($data['sku']);
        }
        
        if(isset($data['upc'])){
            $this->setUpc($data['upc']);
        }

        if(isset($data['ean'])){
            $this->setEan($data['ean']);
        }

        if(isset($data['jan'])){
            $this->setJan($data['jan']);
        }

        if(isset($data['isbn'])){
            $this->setIsbn($data['isbn']);
        }
    
        if(isset($data['mpn'])){
		    $this->setMpn($data['mpn']);
        }

        if(isset($data['location'])){
            $this->setLocation($data['location']);
        }

        if(isset($data['quantity'])){
            $this->setQuantity($data['quantity']);
        }
    
        if(isset($data['image'])){
            $this->setImage($data['image']);
        }

        if(isset($data['price'])){
            $this->setPrice($data['price']);
        }

        if(isset($data['points'])){
            $this->setPoints($data['points']);
        }
        
        if(isset($data['date_available'])){
            $this->setDateAvailable($data['date_available']);
        }

        if(isset($data['weight'])){
            $this->setWeight($data['weight']);
        }

        if(isset($data['length'])){
            $this->setLength($data['length']);
        }

        if(isset($data['width'])){
            $this->setWidth($data['width']);
        }

        if(isset($data['height'])){
            $this->setHeight($data['height']);
        }

        if(isset($data['subtract'])){
            $this->setSubtract($data['subtract']);
        }

        if(isset($data['minimum'])){
    		$this->setMinimum($data['minimum']);
        }

        if(isset($data['sort_order'])){
    		$this->setSortOrder($data['sort_order']);
        }

        if(isset($data['status'])){
    		$this->setStatus($data['status']);
        }

        if(isset($data['date_added'])){
    		$this->setDateAdded($data['date_added']);
        }

        if(isset($data['date_modified'])){
    		$this->setDateModified($data['date_modified']);
        }

        if(isset($data['length_class_id'])){
            $this->setLengthClassId($data['length_class_id']);
        }

        if(isset($data['weight_class_id'])){
            $this->setWeightClassId($data['weight_class_id']);
        }

        if(isset($data['tax_class_id'])){
            $this->setTaxClassId($data['tax_class_id']);
        }
 
        if(isset($data['manufacturer_id'])){
            $this->setManufacturerId($data['manufacturer_id']);
        }

        if(isset($data['stock_status_id'])){
            $this->setStockStatusId($data['stock_status_id']);
        }

        if(isset($data['viewed'])){
	    	$this->setViewed($data['viewed']);
        }

    }

    public function get_id(){
        return $this->product_id;
    }

    public function setId($productId){
        $this->product_id = $productId;
        return $this;
    }
  
    public function setModel($model) {
        $this->model = $model;
        return $this;
    }

    public function getModel(){
        return $this->model;
    }

    public function setSku($sku){
        $this->sku = $sku;
        return $this;
    }

    public function getSku(){
        return $this->sku;
    }

    public function setUpc($upc){
        $this->upc = $upc;
        return $this;
    }

    public function getUpc(){
        return $this->upc;
    }

    public function setEan($ean){
        $this->ean = $ean;
        return $this;
    }

    public function getEan(){
        return $this->ean;
    }

    public function setJan($jan){
        $this->jan = $jan;
        return $this;
    }

    public function getJan(){
        return $this->jan;
    }

    public function setIsbn($isbn){
        $this->isbn = $isbn;
        return $this;
    }

    public function getIsbn(){
        return $this->isbn;
    }

    public function setMpn($mpn){
        $this->mpn = $mpn;
        return $this;
    }
     
    public function getMpn(){
        return $this->mpn;
    }

    public function setLocation($location){
        $this->location = $location;
        return $this;
    }
     
    public function getLocation(){
        return $this->location;
    }

    public function setQuantity($quantity){
        $this->quantity = $quantity;
        return $this;
    }
     
    public function getQuantity(){
        return $this->quantity;
    }

    public function setMinimum($minimum){
        $this->minimum = $minimum;
        return $this;
    }
     
    public function getMinimum(){
        return $this->minimum;
    }

    public function setSubtract($subtract){
        $this->subtract = $subtract;
        return $this;
    }

    public function getSubtract(){
        return $this->subtract;
    }

    public function setShipping($shipping){
        $this->shipping = $shipping;
        return $this;
    }
 
    public function getShipping(){
        return  $this->shipping;
    }
    
    public function setPrice($price){
        $this->price = $price;
        return $this;
    }
    public function getPrice(){
        return $this->price;
    }

    public function setPoints($points){
        $this->points = $points;
        return $this;
    }
    
    public function getPoints(){
        return $this->points;
    }

    public function setWeight($weight){
        $this->weight = $weight;
        return $this;
    }
    
    public function getWeight(){
        return $this->weight;
    }

    public function setLength($length){
        $this->length = $length;
        return $this;
    }
     
    public function getLength(){
        return $this->length;
    }

    public function setWidth($width){
        $this->width = $width;
        return $this;
    }
    
    public function getWidth(){
        return $this->width;
    }

    public function setHeight($height){
        $this->height = $height;
        return $this;
    }
     
    public function getHeight(){
        return $this->height;
    }

    public function setStatus($status){
        $this->status = $status;
        return $this;
    }

    public function get_status(){
        return $this->status;
    }

    public function setSortOrder($sortOrder){
        $this->sort_order = $sortOrder;
        return $this;
    }
     
    public function getSortOrder(){
        return $this->sort_order;
    }

    public function setImage($image){
        $this->image = $image;
        return $this;
    }

    public function getImage(){
        return $this->image;
    }

    public function setManufacturerId($manufacturerId){
        $this->manufacturer_id = $manufacturerId;
        return $this;
    }

    public function getManufacturerId(){
        return $this->manufacturer_id;
    }

    public function setStockStatusId($stockStatusId){
        $this->stock_status_id = $stockStatusId;
    }

    public function getStockStatusId(){
        return $this->stock_status_id;
    }

    public function setTaxClassId($taxClassId){
        $this->tax_class_id = $taxClassId;
        return $this;
    }

    public function getTaxClassId(){
        return $this->tax_class_id;
    }

    public function setWeightClassId($weightClassId){
        $this->weight_class_id = $weightClassId;
        return $this;
    }

    public function getWeightClassId(){
        return $this->weight_class_id;
    }
	
    public function setLengthClassId($lengthClassId){
        $this->length_class_id = $lengthClassId;
        return $this;
    }

    public function getLengthClassId(){
        return $this->length_class_id;
    }
    	
    public function setViewed($viewed){
        $this->viewed = $viewed;
        return $this;
    }

    public function getViewed(){
        return $this->viewed;
    }

    public function setDateAdded($dateAdded){
        $this->date_added = $dateAdded;
        return $this;
    }

    public function get_date_added(){
        return $this->date_added;
    }

    public function setDateModified($dateModified){
        $this->date_modified = $dateModified;
        return $this;
    }

    public function getDateModified(){
        return $this->date_modified;
    }

    public function setDateAvailable($date_available){
        $this->date_available = $date_available;
        return $this;
    }

    public function getDateAvailable(){
        return $this->date_available;
    }
}
